package com.ziyueyuwen.xiniao.service;

import com.ziyueyuwen.xiniao.bean.ao.QuestionForCourseLessonAO;
import com.ziyueyuwen.xiniao.bean.question.CourseLessonElementData;
import com.ziyueyuwen.xiniao.bean.question.ZyQuestionCourseQuestion;
import com.ziyueyuwen.xiniao.bean.question.ZyQuestionData;
import com.ziyueyuwen.xiniao.bean.vo.ZyQuestionDataVO;
import com.ziyueyuwen.xiniao.enums.LessonModuleEnum;

import java.util.List;

/**
 * @author wancheng  on 2019/1/10.
 */
public interface QuestionCourseService {
    /**
     * 添加 返回主键
     * @param question
     * @return
     */
    ZyQuestionCourseQuestion insert(ZyQuestionCourseQuestion question);

    /**
     * 批量保存
     * @param questions
     */
    void insertBatch(List<ZyQuestionCourseQuestion> questions);

    /**
     * 通过主键 修改
     * @param question
     * @return
     */
    ZyQuestionCourseQuestion updateByPreKey(ZyQuestionCourseQuestion question);

    /**
     * 删除
     * @param id
     */
    void deleteByPreKey(Integer id);

    /**
     * 删除
     * @param bean
     */
    void deleteByBean(ZyQuestionCourseQuestion bean);

    /**
     * 获取课程的相关课前预习 作业 回顾 总结 信息
     * @param courseId
     * @return
     */
    List<ZyQuestionCourseQuestion> getByCourseId(Integer courseId);

    /**
     * 实体类查询
     * @param question
     * @return
     */
    List<ZyQuestionCourseQuestion> getByObject(ZyQuestionCourseQuestion question);
    /**
     * 课程详情
     * @param courseId
     * @return
     */
    List<CourseLessonElementData>  getCourseDetails(Integer courseId);

    /**
     * 修改 课节题型
     * @param updateData
     * @return
     * @throws Exception
     */
    List<ZyQuestionData> updateQuestionForCourseLesson(QuestionForCourseLessonAO updateData) throws Exception;

    /**
     * 获取课节题型
     * @param courseId
     * @param lessonIndex
     * @param type
     * @return
     */
    List<ZyQuestionDataVO> getQuestionOfCourseLesson(Integer courseId, Integer lessonIndex, LessonModuleEnum type);

    /**
     * 获取课节题型
     * @param courseId
     * @param lessonIndex
     * @param type
     * @param questionGroup
     * @return
     */
    List<ZyQuestionDataVO> getQuestionOfCourseLesson(Integer courseId, Integer lessonIndex, LessonModuleEnum type,Integer questionGroup);
}
